package cn.exrick.xboot.enterpriseUser.controllerImp

import cn.exrick.xboot.base.entity.DepartmentUser
import cn.exrick.xboot.base.service.IDepartmentUserService
import cn.exrick.xboot.core.common.vo.PageVo
import cn.exrick.xboot.core.common.vo.Result
import cn.exrick.xboot.enterpriseUser.controller.IEnterpriseUserController
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.RestController

@RestController
open class DepartmentUserController : IEnterpriseUserController.IDepartmentUser {


    @Autowired
    private lateinit var iDepartmentUserService: IDepartmentUserService

    override fun createDepartmentUser(departmentUser: DepartmentUser): Result<Any?>? {

        return iDepartmentUserService.createDepartmentUser(departmentUser)
    }

    override fun updateDepartmentUser(departmentUser: DepartmentUser): Result<Any?>? {

        return iDepartmentUserService.updateDepartmentUser(departmentUser)
    }

    override fun removeDepartmentUser(ids: Array<out String>): Result<Any?>? {

        return iDepartmentUserService.removeDepartmentUser(ids)
    }

    override fun getDepartmentUserList(pageVo: PageVo, departmentUser: DepartmentUser, levelType: Int): Result<MutableMap<String, Any?>>? {

        return iDepartmentUserService.getDepartmentUserList(pageVo, departmentUser, levelType)
    }
}